package com.itc.bpm.bean;

import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.itc.bpm.dto.BpmProcessCategoryDto;
import com.itc.common.core.utils.bean.BeanUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@TableName("bpm_process_category")
public class BpmProcessCategory extends BaseDO{
    @TableId
    private Long id;
    @ApiModelProperty(value = "分类编码")
    private String code;
    @TableField(condition = SqlCondition.LIKE)
    @ApiModelProperty(value = "分类名称")
    private String name;
    @ApiModelProperty(value = "父节点id")
    private Long parentId;
    @ApiModelProperty(value = "备注")
    private String description;
    @ApiModelProperty(value = "分类序号")
    private Integer orderNo;
    @ApiModelProperty(value = "状态 0 正常 1停用")
    private Integer status;
    @ApiModelProperty(value = "状态 0 航班类 1 告警类")
    private Integer type;

    public static BpmProcessCategoryDto getVoByEntity(BpmProcessCategory entity) {
        BpmProcessCategoryDto vo = new BpmProcessCategoryDto();
        BeanUtils.copyProperties(entity, vo);
        return vo;
    }
}
